home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-2 / Inter.Net 55-2.iso / Mandrake / mdkinst / usr / bin / perl-install / standalone / printerdrake < prev    next >
Encoding:
Text File  |  2000-01-12  |  1.5 KB  |  48 lines

  1. #!/usr/bin/perl
  2.  
  3. # printerdrake
  4. # Copyright (C) 1999 MandrakeSoft (fpons@linux-mandrake.com)
  5. # Original version for printer configuration from pad.
  6. #
  7. # This program is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2, or (at your option)
  10. # any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20.  
  21. use lib qw(/usr/lib/libDrakX);
  22.  
  23. use interactive;
  24. use printerdrake;
  25. use c;
  26.  
  27. local $_ = join '', @ARGV;
  28.  
  29. /-h/ and die "usage: printerdrake [--beginner] [--expert] [--auto] [--noauto] [--skiptest] [--testing]\n";
  30.  
  31. $::beginner = /-beginner/;
  32. $::expert = /-expert/;
  33. $::auto = /-auto/;
  34. $::noauto = /-noauto/;
  35. $::skiptest = /-skiptest/;
  36. $::testing = /-testing/;
  37. $::isStandalone = 1;
  38.  
  39. my $f = "/usr/lib/rhs/rhs-printfilters";
  40. -e $f or system("urpmi --auto rhs-printfilters");
  41. -e $f or die "install rhs-printfilters first!\n";
  42.  
  43. my $in = vnew interactive('su');
  44.  
  45. printerdrake::main('', printerdrake::getinfo(''), $in, sub { `urpmi --auto $_[0]` });
  46.  
  47. $in->exit(0);
  48.